<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">

    <body>

        <ui:composition>

            <div id="post">
                <p:dataTable var="itemTemp" value="#{QuestaoController.itens}" emptyMessage="Nenhum Arquivo Encontrado" >

                    <p:column sortBy="#{itemTemp.descricao}">
                        <f:facet name="header">
                            <h:outputText value="Descrição" />
                        </f:facet>
                        <h:outputText value="#{itemTemp.descricao}" escape="false" />
                    </p:column>

                    <p:column>
                        <f:facet name="header">
                            <h:outputText value="S" />
                        </f:facet>
                        <h:outputText value="Verdadeira" rendered="#{itemTemp.verdadeiro}" />
                        <h:outputText value="Falso" rendered="#{!itemTemp.verdadeiro}" />
                    </p:column>

                    <p:column style="text-align: center;" >
                        <f:facet name="header">
                            <h:outputText value="Painel" />
                        </f:facet>
                        <p:commandButton image="ui-icon-pencil" title="editar" actionListener="#{QuestaoController.editItem}" ajax="false" />
                        <p:commandButton image="ui-icon ui-icon-close" title="excluir" actionListener="#{QuestaoController.removeItem}" ajax="false" />

                    </p:column>

                </p:dataTable>


            </div>
        </ui:composition>

    </body>
</html>
